Item

Create a item file

To create a item file you create a file with an extension of .item in the customItems.

Attributes

id

The id attribute defines the id of the item. This attribute must be set.

name

The name attribute defines the name of the item. This name is shown in game. This attribute must be set.

iconfile

The iconfile attribute defines the sprite sheet that is used by the item. The sprite sheet has to be a '.png' file. The size of the sprite sheet has to be 256x256 (for 16x16 textures), 128x128 (for 8x8 textures), 512x512 (for 32x32 textures), etc. If you want to use the vanilla minecraft item sprite sheet, you set it to 'gui/items.png'. The default value is "gui/items.png".

iconindex

The iconindex attribute defines the texture in the iconfile that is used for the item. The top left texture is 0 the one right to it is 1 and so on. This attribute must be set.

type

The type attribute defines the type of the item. Valid values are normal, food, door, helmet, body, legs, boots and grenade. The default value is "normal".

iddoor

The iddoor defines the id of the doorblock. This is only for type door.

maxstack

The maxstack attribute defines the maximum stack size. Valid values are between 1 and 64 (including both). The default value is 64.

healamount

The healamount defines how many half sticks the food heals. The default value is 1.

saturation

The saturation defines how much the food satures, how long the hunger bar will not decrease. The default value is 0.6.

efficiency

The efficiency attribute defines how fast the item mines that block it is efficient on. The default value is 4.0.

damage

The damage attribute defines how many half hearts a mob takes from the item. The default value is 1.

maxuses

The maxuses attribute defines how often the item can be damaged before it will break. The default value is 1.

harvestblocks

The harvestblocks attribute defines what blocks the item can mine. Valid values are all, default, pickaxewood, pickaxestone, pickaxeiron, pickaxediamond and every block id. You can use multiple ones by dividing them with a ','. Default value is 'default'.

efficiencyblocks

The efficiencyblocks attribute defines on what blocks the item is efficient. Valid values are all, none, pickaxe, axe, shovel and every blockid. The default value is 'none'.

block

The block attribute defines if the item can block like the vanilla sword does. The default value is false.

armorname

The armorname attribute defines the prefix of your armortextures. You have to name your armortextures e.g. dirt_1.png (for legs) and dirt_2.png (for helmet, body and boots) and set 'armorname=dirt' and NOT 'armorname=dirt_1.png'.

armormaterial

The armormaterial defines the material of the armor. Valid values are cloth, chain, iron, gold and diamond. The default value is 'cloth'.

repairable

The repairable attribute defines if the item can use the repair recipes. The default value is true.

nofalldamage

The nofalldamage defines if the armor gives you the ability to have no falldamage when wearing. The default value is false.

noburning

The noburning defines if the armor gives you immunity against fire (and lava) when wearing. The default value is false.

grenadetime

The grenadetime attribute defines how long the grenade flies until it calls the explode trigger and disappears. The default value is 50.

grenadethrowforce

The grenadethrowforce attribute defines how far you throw the grenade. The default value is 1.0.

bounce

The bounce attribute defines how much the grenade is bouncing. The default value is 0.6f.

toolclass

The toolclass attribute defines the toolclasses of the item. If a block uses this toolclass you can mine it. The vanilla ones are axe, shovel, pickaxe and hoe.

harvestlevel

The harvestlevel attribute defines the harvestlevel of the item. The toolclass and this together are used to check if a block can be mined. For example an iron pickaxe has a higher harvestlevel than a wooden one.

Script triggers

rightclick

This trigger is called when the player rightclicks with the item on a block. You can use world, origin, player and side.

blockdestroyed

This trigger is called when the player destroys a block with the item. You can use world, origin, player and destroyedid.

hitmob

This trigger is called when the player hits a mob (or player) with the item. You can use world, player and living.

explode

This trigger is called when the grenade disappears. You can use world and origin.

eaten

This trigger is called when the food is eaten. You can use world and player.

rightclickair

This trigger is called when the player rightclicks no matter if on a block or not. You can use world and player.

crafted

This trigger is called when the item was taken from the crafting table. You can use world and player side.

inuse

This trigger is called when the item is in use. You can use world, player and usecount.